package com.kunya.product.controller.portall;


import com.kunya.common.common.ServerResponse;
import com.kunya.product.po.ServerInfomation;
import com.kunya.product.service.IServerInfomationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author cdy
 * @Description: 商家信息controller
 * @date 2018/7/14
 */
@RestController
@RequestMapping(value = "/serverInfomation")
public class ServerInfomationController {

    @Autowired
    private IServerInfomationService iServerInfomationService;

    /**
     * 显示商家信息
     * @param userId
     * @return
     */
    @RequestMapping(value = "/select")
    public ServerResponse select(Long userId){
        return iServerInfomationService.select(userId);
    }

    /**
     * 添加或者更新商家信息
     * @param serverInfomation
     * @return
     */
    @RequestMapping(value = "/addOrUpdate")
    public ServerResponse addOrUpdate(ServerInfomation serverInfomation){
        return iServerInfomationService.addOrUpdate(serverInfomation);
    }

}
